package com.zhao.dota.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zhao.dota.bo.PlayerMatchSummary;
import com.zhao.dota.bo.PlayerPeers;
import com.zhao.dota.model.DotaMatch;
import com.zhao.dota.model.MatchPlayer;
import com.zhao.dota.model.Player;
import com.zhao.dota.vo.HeroWinRate;

import java.time.LocalDateTime;
import java.util.List;

public interface MatchPlayerService extends IService<MatchPlayer> {

    int saveList(DotaMatch match, List<MatchPlayer> list);

    List<MatchPlayer> findByMatchId(Integer matchId);

    MatchPlayer count(Player player, int limit);

    Page<PlayerMatchSummary> page(Page page, Long steamId);

    Page<PlayerPeers> peersOrEnemies(Page page, Long steamId, boolean peer);

    Page<HeroWinRate> groupByPlayerHero(Integer playerId, Page page);

    Page<HeroWinRate> groupByHero(Page page, LocalDateTime startTime, LocalDateTime endTime);

}
